<?php
/**
 * Description
 * 
 * PHP version 7
 * 
 * @category Custom
 * @package  Custom
 * @author   ryu <mo5467@126.com>
 * @date     2020-04-25 11:54:03
 * @lastTime 2020-05-01 23:06:58
 * @license  https://opensource.org/licenses/MIT MIT License
 * @link     none
 */

namespace Test\Unit;

use Design\Structural\FluentInterface\Sql;

class FluentInterfaceTest extends \Test\BaseTest
{


    public function testBuildSql()
    {
        $sql = (new Sql())
            ->from('user', 'u')
            ->where('u.name=foo')
            ->select(['u.name', 'u.email']);

        $this->assertSame('SELECT u.name,u.email FROM user AS u WHERE u.name=foo', (string) $sql);

    }//end testBuildSql()


}//end class
